import request from '@/utils/request'

export const getDepartments = () => request({
  url: '/company/department'
})

// 删除部门
export const delDepartments = (id) => request({
  url: `/company/department/${id}`,
  method: 'DELETE'
})

// 新增部门
export const addDepartments = data => request({
  url: '/company/department',
  method: 'POST',
  data
})

// 根据ID获取部门
export const acdIdGetDepts = id => request({
  url: `/company/department/${id}`
})

// 修改部门信息
export const updateDepts = data => request({
  url: `/company/department/${data.id}`,
  method: 'put'
})
